<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  layout:decorator="layouts/layout" th:with="header='编辑盘点单', subtext='编辑指定盘点单数据'">

<head>
	<title>编辑盘点单</title>
</head>
<body>
	<th:block layout:fragment="content">
		<div class="box">
			<div class="box-body">
				<form id="coForm" name="coForm" th:object="${m}" th:action="@{|${baseUrl}/save${m.id==null?'':'/' + m.id}|}" method="post" class="form-horizontal" novalidate="novalidate">
					<input id="id" type="hidden" name="id" th:field="*{id}" />
					<input id="version" type="hidden" name="version" th:field="*{version}" />
					<div class="row line">
						<div class="col-lg-6">
							<h3 class="page-header">基本设置</h3>
						</div>
					</div>
					
                  			<div class="row">
								<div class="col-sm-6">
									<div class="form-group">
										<label class="control-label col-sm-3 mg-top-6 ">单号</label>
										<div class="col-sm-8 form-control-static">
											<input id="documentNumber" name="documentNumber" th:value="*{documentNumber}" maxlength="20" th:readonly="${not m.new}" class="form-control" />
										</div>
									</div>
								</div>
						   </div>

                  			<div class="row">
								<div class="col-sm-6">
									<div class="form-group">
										<label class="control-label col-sm-3 mg-top-6 ">参考单号</label>
										<div class="col-sm-8 form-control-static">
											<input id="refDocNumber" name="refDocNumber" th:value="*{refDocNumber}" maxlength="20"
											class="form-control" />
										</div>
									</div>
								</div>
						   </div>

                            <div class="row">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label class="control-label col-sm-3 mg-top-6 ">容器编码 从</label>
                                        <div class="col-sm-8 form-control-static">
                                            <input id="fromQty" name="fromQty" th:value="${m.fromQty != null ? #numbers.formatDecimal(m.fromQty,0,0) : ''}" maxlength="20" class="form-control" />
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label class="control-label col-sm-3 mg-top-6 ">到</label>
                                        <div class="col-sm-8 form-control-static">
											<input id="toQty" name="toQty" th:value="${m.toQty != null ? #numbers.formatDecimal(m.toQty,0,0) : ''}" maxlength="20" class="form-control" />
                                        </div>
                                    </div>
                                </div>
                            </div>


						<div class="row">
							<div class="col-sm-6">
								<div class="form-group">
									<label class="control-label col-sm-3 mg-top-6 ">列 从</label>
									<div class="col-sm-8 form-control-static">
										<input id="hEdi05" name="hEdi05" th:value="*{hEdi05}" maxlength="20" class="form-control" />
									</div>
								</div>
							</div>
						</div>

						<div class="row">
							<div class="col-sm-6">
								<div class="form-group">
									<label class="control-label col-sm-3 mg-top-6 ">到</label>
									<div class="col-sm-8 form-control-static">
										<input id="hEdi06" name="hEdi06" th:value="*{hEdi06}" maxlength="20" class="form-control" />
									</div>
								</div>
							</div>
						</div>


                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="control-label col-sm-3 mg-top-6 ">层 从</label>
                                <div class="col-sm-8 form-control-static">
									<input id="hEdi07" name="hEdi07" th:value="*{hEdi07}" maxlength="20" class="form-control" />
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="control-label col-sm-3 mg-top-6 ">到</label>
                                <div class="col-sm-8 form-control-static">
									<input id="hEdi08" name="hEdi08" th:value="*{hEdi08}" maxlength="20" class="form-control" />
                                </div>
                            </div>
                        </div>
                    </div>



					<div class="row">
						<div class="col-sm-6">
							<div class="form-group">
								<label class="control-label col-sm-3 mg-top-6">收货时间 从</label>
								<div class="col-sm-8">
									<input id="fromTime" name="fromTime" th:value="${m.fromTime != null ? #dates.format(m.fromTime, 'yyyy-MM-dd') : ''}" th:readonly="${not m.new}"
										   class="form-control form_datetime dateTimePicker" />
								</div>
							</div>
						</div>
					</div>


					<div class="row">
						<div class="col-sm-6">
							<div class="form-group">
								<label class="control-label col-sm-3 mg-top-6">到</label>
								<div class="col-sm-8">
									<input id="toTime" name="toTime" th:value="${m.toTime != null ? #dates.format(m.toTime, 'yyyy-MM-dd') : ''}" th:readonly="${not m.new}"
										   class="form-control form_datetime dateTimePicker" />
								</div>
							</div>
						</div>
					</div>


                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="control-label col-sm-3 mg-top-6">预计盘点时间</label>
                                    <div class="col-sm-8">
                                        <input id="expectedTime" name="expectedTime" th:value="${m.expectedTime != null ? #dates.format(m.expectedTime, 'yyyy-MM-dd') : ''}" th:readonly="${not m.new}"
                                               class="form-control form_datetime dateTimePicker" />
                                    </div>
                                </div>
                            </div>
                        </div>


					   <div class="hr-line-dashed"></div>
                       <div class="form-group">
                            <div class="text-center">
                                <a class="btn btn-default " th:href="@{|${baseUrl}|}">
                                    <i class="fa fa-fw fa-reply"></i> 返回
                                </a>
                                <button type="submit" class="btn btn-primary">
                                    <i class="fa fa-fw  fa-save"></i> 保存
                                </button>
                            </div>
                      </div>

				</form>
			</div>
		</div>
	</th:block>
	<th:block layout:fragment="scripts">
		<script th:replace="layouts/fragments/validatejs :: validate"></script>


		<script th:src="@{|${theme}/plugins/fullcalendar/moment.min.js?v=${applicationVersion}|}"></script>
		<script th:src="@{|${theme}/plugins/datetimepicker/bootstrap-datetimepicker.min.js?v=${applicationVersion}|}" th:inline="javascript"></script>
        <script th:src="@{|${theme}/plugins/datetimepicker/locales/bootstrap-datetimepicker.zh-CN.js?v=${applicationVersion}|}" th:inline="javascript"></script>

        <script th:inline="javascript">
    	  // 后端传入前端使用的变量JS中定义
	      var oldNo = /*[[${m.documentNumber}]]*/'';
    	</script>
		<script th:src="@{|${theme}/js/app/inventory/co_form.js?v=${applicationVersion}|}" th:inline="javascript"></script>
	</th:block>
</body>

</html>